//
//  TSSuggestEditContentController.m
//  chart
//
//  Created by 曾斌 on 16/4/14.
//  Copyright (c) 2016年 xu. All rights reserved.
//

#import "TSAuditEditController.h"
#import "TSTaskModel.h"
@implementation TSAuditEditController
{
    TSTaskModel *taskModel;
}
@synthesize taskId;
-(void) initTitle{
    self.title =@"评价内容";
    WS(weakSelf);
    [self rightBarButtonWithTitle:@"确认" barNorImage:nil barHltImage:nil action:^{
        if (!weakSelf) {
            return;
        }
        [weakSelf rightClick];
    }];
}

-(void)rightClick
{
    WS(weakSelf);
    taskModel = [[TSTaskModel alloc] init];
    taskModel.requestParams = @{@"id":taskId,@"content": [self.textField text]};
    [taskModel fetchWithPath:kRequestUrl_Task_action_appraisal completionHandler:^(BOOL isSucceeded, NSError *error) {
        [TSTools showAlert:@"评价成功"];
        [weakSelf.navigationController popViewControllerAnimated:YES];
        
    } NoProgress:NO];
}
@end
